import request from '@/utils/request'

export function getDashboardNumber(params) {
  return request({
    url: '/api/question/getDashboardNumber',
    method: 'post',
    params
  })
}

export function getDashboardListNumber() {
  return request({
    url: '/api/question/getDashboardListNumber',
    method: 'post'
  })
}

export function getQuestionListByUserCode(params) {
  return request({
    url: '/api/question/getQuestionListByUserCode',
    method: 'post',
    params
  })
}
export function getQuestionAndDetailById(params) {
  return request({
    url: '/api/question/getQuestionAndDetailById',
    method: 'post',
    params
  })
}

export function getQuestionById(params) {
  return request({
    url: '/api/question/getQuestionById',
    method: 'post',
    params
  })
}
export function getQuestionDetailListByQuestionId(params) {
  return request({
    url: '/api/question/getQuestionDetailListByQuestionId',
    method: 'post',
    params
  })
}
export function updateQuestion(data) {
  return request({
    url: '/api/question/updateQuestion',
    method: 'post',
    data
  })
}
export function updateQuestionSetting(data) {
  return request({
    url: '/api/question/updateQuestionSetting',
    method: 'post',
    data
  })
}
export function publishQuestion(data) {
  return request({
    url: '/api/question/publishQuestion',
    method: 'post',
    data
  })
}
export function deleteQuestion(data) {
  return request({
    url: '/api/question/deleteQuestion',
    method: 'post',
    data
  })
}
export function completeDeleteQuestion(data) {
  return request({
    url: '/api/question/completeDeleteQuestion',
    method: 'post',
    data
  })
}
export function saveQuestion(data) {
  return request({
    url: '/api/question/saveQuestion',
    method: 'post',
    data
  })
}
export function copyQuestion(data) {
  return request({
    url: '/api/question/copyQuestion',
    method: 'post',
    data
  })
}

export function validateQuestionLimit(params) {
  return request({
    url: '/api/question/validateQuestionLimit',
    method: 'post',
    params
  })
}
